package model;

public class RelevantNode implements Comparable<RelevantNode>{
	private String pid;
	private double score;
	private String position; //start / end
	
	public RelevantNode(String p, double w) {
		this.pid = p;
		this.score = w;
	}
	
	public RelevantNode(String p,double w,String position){
		this.pid = p;
		this.score = w;
		this.position = position;
	}
	
	/*
	 * reverse order
	 */
	public int compareTo(RelevantNode n) {
		double other = n.getScore();
		if (score > other)
			return -1;
		else if (score == other)
			return 0;
		else
			return 1;
	}

	public String getPid() {
		return pid;
	}

	public double getScore() {
		return score;
	}
	
	public void setScore(double s) {
		this.score = s;
	}

	public String getPosition() {
		return position;
	}
	
	
}
